import requests
from config import ENV

def login(username,password):
    data={
        "method":"GET",
        "url":f"{ENV.HOST}/adminapi/login",
        "headers":{},
        "params":{
            "username":username,
            "password":password
         }
    }
    return requests.request(**data)
TOKEN=login(ENV.USERNAME,ENV.PASSWORD).json()["data"]["token"]
